x86: check if desc->action is NULL when unbinding guest pirq
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 22 Jan 2010 11:01:18 +0000 (11:01 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 22 Jan 2010 11:01:18 +0000 (11:01 +0000)
commite591bdb0182434f2886498a876f89ea7fdcff509
tree206d6c2f3e616f64f425d2b2ed10bc75e661809f
parent939629eb5b1f143b12eee9396d6a8c8b1e0f3226
x86: check if desc->action is NULL when unbinding guest pirq

Before igb PF driver is unloaded, dom0 doesn't unload igbvf driver
automatically. When igb drver is unloaded, it invokes the
PHYSDEVOP_manage_pci_remove hypercall to remove the VFs and xen frees
the msi irqs by pci_cleanup_msi() -> ... -> dynamic_irq_cleanup() and
sets the desc->action to NULL.  igbvf driver knows the VF is
disappearing via a hook ndo_stop() in dev_close() and tries to unbind
the pirq and xen would crash as the desc->action is NULL now.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
xen/arch/x86/irq.c